function logClass1(params: string) {
  return function (target: any) {
    console.log("类装饰器1", params, target);
  };
}
function logClass2(params: string) {
  return function (target: any) {
    console.log("类装饰器2", params, target);
  };
}
function logProps(params: string) {
  return function (target: any, attr: any) {
    target[attr] = params;
    console.log("属性装饰器1", params, target, attr);
  };
}
function logMehtod(params: string) {
  return function (target: any, method: string, desc: any) {
    console.log("方法装饰器1", target, method, desc);
  };
}
function logParams1(params: string) {
  return function (target: any, method: string, index: any) {
    console.log("参数装饰器1", target, method, index);
  };
}
function logParams2(params: string) {
  return function (target: any, method: string, index: any) {
    console.log("参数装饰器2", target, method, index);
  };
}

// 装饰的默认参数就是这个class类
@logClass1("累的参数1")
@logClass2("累的参数2")
class HttpClient {
  @logProps("属性的参数")
  url: string | undefined;
  @logMehtod("方法的参数")
  getData() {
    console.log('getData')
  }
  setData(@logParams1('参数1') a:any,@logParams2('参数2') b:any) {

  }
}
let http: any = new HttpClient();
